<template>
    <view>
        <template name="wxParse11">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse10">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse9">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse8">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse7">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse6">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse5">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse4">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse3">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse2">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse1">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse0">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-c="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tag == 'table'">
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView" v-if="false" v-else-if="item.node == 'text'">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse">
            <!-- <template is="wxParse0" :data="item:item" v-for="(item,index) in (wxParseData)" :key="index"></template> -->
            <mp-html :content="item" v-for="(item, index) in wxParseData" :key="index"></mp-html>
        </template>
        <!-- template对应的原始代码，为保证正常显示，已对其进行隐藏。 -->
        <block name="WxEmojiView" v-if="false">
            <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                <block v-for="(item, index) in item.textArray" :key="index">
                    <block v-if="item.node == 'text'">{{ item.text }}</block>

                    <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                </block>
            </view>
        </block>
        <template name="wxParseImg">
            <image
                @load="wxParseImgLoad"
                @tap="wxParseImgTap"
                :class="item.classStr + ' wxParse-' + item.tag"
                :data-from="item.from"
                :data-idx="item.imgIndex"
                :data-src="item.attr.src"
                mode="widthFix"
                :src="item.attr.src"
                :style="'width:' + item.width + 'px;'"
            ></image>
        </template>
        <template name="wxParseVideo">
            <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr">
                <video :class="item.classStr + ' wxParse-' + item.tag + '-video'" :src="item.attr.src"></video>
            </view>
        </template>
    </view>
</template>

<script>
function e(e) {
    return e && e.__esModule
        ? e
        : {
              default: e
          };
}
function t(e) {
    var that = this;
    var a = e.target.dataset.src;
    var i = e.target.dataset.from;
    if (void 0 !== i && i.length > 0) {
        uni.previewImage({
            current: a,
            urls: that[i].imageUrls
        });
    }
}
function a(e) {
    var that = this;
    var a = e.target.dataset.from;
    var r = e.target.dataset.idx;
    if (void 0 !== a && a.length > 0) {
        i(e, r, that, a);
    }
}
function i(e, t, a, i) {
    var d = a.data[i];
    if (0 != d.images.length) {
        var n = d.images;
        var s = r(e.detail.width, e.detail.height, a, i);
        n[t].width = s.imageWidth;
        n[t].height = s.imageheight;
        d.images = n;
        var o = {};
        o[i] = d;
        a.setData(o);
    }
}
function r(e, t, a, i) {
    var r = 0;
    var d = 0;
    var n = 0;
    var s = 0;
    var o = {};
    uni.getSystemInfo({
        success: function (g) {
            var h = a.data[i].view.imagePadding;
            r = g.windowWidth - 2 * h;
            d = g.windowHeight;
            e > r ? ((s = ((n = r) * t) / e), (o.imageWidth = n), (o.imageheight = s)) : ((o.imageWidth = e), (o.imageheight = t));
        }
    });
    return o;
}
var d = e(require('./showdown.js'));
var n = e(require('./html2json.js'));
module.exports = {
    wxParse: function () {
        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 'wxParseData';
        var i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 'html';
        var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : '<div class="color:red;">数据不能为空</div>';
        var s = arguments[3];
        var o = arguments[4];
        var g = s;
        var h = {};
        if ('html' == i) h = n.default.html2json(r, e);
        else if ('md' == i || 'markdown' == i) {
            var m = new d.default.Converter().makeHtml(r);
            h = n.default.html2json(m, e);
        }
        h.view = {};
        h.view.imagePadding = 0;
        if (void 0 !== o) {
            h.view.imagePadding = o;
        }
        var l = {};
        l[e] = h;
        g.setData(l);
        g.wxParseImgLoad = a;
        g.wxParseImgTap = t;
    },
    wxParseTemArray: function (e, t, a, i) {
        for (var r = [], d = i.data, n = null, s = 0; s < a; s++) {
            var o = d[t + s].nodes;
            r.push(o);
        }
        e = e || 'wxParseTemArray';
        (n = JSON.parse('{"' + e + '":""}'))[e] = r;
        i.setData(n);
    },
    emojisInit: function () {
        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : '';
        var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : '/utils/emojis/';
        var a = arguments[2];
        n.default.emojisInit(e, t, a);
    }
};
</script>
<style>
@import './wxParse.css';
@import '@/utils/wxParse.css';
</style>
